#include "CCmdOss.h"
#include "../cmd/dataprepare.h"
#include "../mainctrl.h"
#include "commmsg.h"
#include "commclass.h"

CT_REGISTER_ASYNCCMD(ID_MAINDB_OSS , CCmdOss);

int CCmdOss::Do(void* pData)
{
    if (pData != NULL)
    {
        CT_WARNING(("inner cmd CCmdOss get data"));
        return Done(RET_OK);
    }

    if (pstMainCtrl == NULL)
    {
        CT_ERROR(("mainctrl point is null"));
        return Done(RET_SYSTEM_FAIL);
    }

    LogicDo(RET_OK);
    return RET_OK;
}

int CCmdOss::LogicDo(int iRet)
{
    if (iRet != RET_OK)
    {
        CT_ERROR(("CCmdOss error , ret %d", iRet));
        return Done(iRet);
    }

    PREPARE_PLAYER_SNS_DETAIL_INFO(this, stOssPlayerTriggerData._uiGID);

    pstMainCtrl->m_stOssMgr.TriggerPlayer(stOssPlayerTriggerData);

    return Done(iRet);
}
